-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resetBrowser #237
resetBrowser #237
Conversation
I'm not sure how to get the |
hi @UziTech thanks for your great work! I will take a look before this Sunday. |
Add `browser.isConnected()` to the public api to be able to tell when the browser is connected fixes argos-ci/jest-puppeteer#237 (comment)
puppeteer/puppeteer#4403 did get merged so there will be a Should we wait to merge this until that is released? Or we could just change the test later. |
Hmm, we support also old versions of Puppeteer, so we should not rely on this method. |
That code is just in the test so we would just need to update puppeteer in devDependencies. That code isn't crucial so I don't think it matters too much if we don't use |
@UziTech if it is only in test, then it is OK for me, do you know when will it be released? |
I updated puppeteer in |
It looks good, @xiaoyuhen are you OK with it? |
@xiaoyuhen @neoziro any progress on this? |
@xiaoyuhen seems to be absent. I will try to take time to test it next week. |
I fixed the spelling and rebased to fix the conflict. |
Summary
Add
jestPuppeteer.resetBrowser()
function to reset theglobal.browser
object according to the configuration.global.browser
is is setup based on the configuration.This will allow the browser to be reset by the user and ensure the
global.browser
object will be the same after this call as the when it was first setup.Users can reset the
global.browser
object before each test by callingjestPuppeteer.resetBrowser()
in abeforeEach
function easily.fixes #183 (comment)
Test plan